package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.LmbCousumablePlanDetail;

public interface LmbCousPurPlandeDAO extends CrudRepository<LmbCousumablePlanDetail, String>{
	@Query("select max(c.cpdId) from LmbCousumablePlanDetail c where c.cpdId like ?1%")
    public String findMaxID(String a);

    public List<LmbCousumablePlanDetail> findByCpdCpPlanId(String a);
    
    //分页显示采购计划详情
  	@Query("select s from LmbCousumablePlanDetail s where s.cpdCpPlanId=?1 order by s.cpdId desc")
  	public List<LmbCousumablePlanDetail> findCurPurPlanDetailsByPage(String id,Pageable pageable);
}
